import request from '@/utils/request'

export function getRoleList (parameter) {
  return request({
    url: '/boss/system/role/config/list',
    method: 'post',
    data: parameter
  })
}
export function roleList (parameter) {
  return request({
    url: '/common/getSystemRole',
    method: 'post',
    data: parameter
  })
}
export function addRole (parameter) {
  return request({
    url: '/boss/system/role/config/add',
    method: 'post',
    data: parameter
  })
}
export function upDataRole (parameter) {
  return request({
    url: '/boss/system/role/config/update',
    method: 'post',
    data: parameter
  })
}
export function delRole (parameter) {
  return request({
    url: '/boss/system/role/config/delete',
    method: 'post',
    data: parameter
  })
}
export function userRole (parameter) {
  return request({
    url: '/boss/system/role/config/getPms',
    method: 'post',
    data: parameter
  })
}
export function craDefaultRole (parameter) {
  return request({
    url: 'boss/pro/pms/config/craDefaultRole ',
    method: 'post',
    data: parameter
  })
}
export function getRoleListByPro (parameter) {
  return request({
    url: '/boss/pro/role/config/list',
    method: 'post',
    data: parameter
  })
}
export function addRoleByPro (parameter) {
  return request({
    url: '/boss/pro/role/config/add',
    method: 'post',
    data: parameter
  })
}
export function upDataRoleByPro (parameter) {
  return request({
    url: '/boss/pro/role/config/update',
    method: 'post',
    data: parameter
  })
}
export function delRoleByPro (parameter) {
  return request({
    url: '/boss/pro/role/config/delete',
    method: 'post',
    data: parameter
  })
}
export function userRoleByPro (parameter) {
  return request({
    url: '/boss/pro/role/config/getPms',
    method: 'post',
    data: parameter
  })
}
export function getProjectUserRole (parameter) {
  return request({
    url: '/boss/pro/role/config/copy',
    method: 'post',
    data: parameter
  })
}
export function getSystemUserRole (parameter) {
  return request({
    url: '/boss/system/role/config/copy',
    method: 'post',
    data: parameter
  })
}

export function apiUpdateProRoleStatus (parameter) {
  return request({
    url: '/boss/pro/role/config/updateStatus',
    method: 'post',
    data: parameter
  })
}

export function apiGetRoleListByPro (parameter) {
  return request({
    url: '/boss/pro/role/roleDropDownBox',
    method: 'get',
    params: parameter
  })
}
